package com.dxc.intern.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dxc.intern.entity.Post;
import com.dxc.intern.mapper.PostMapper;
import com.dxc.intern.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangchengming
 * @since 2022-02-21
 */
@Service
public class PostServiceImpl extends ServiceImpl<PostMapper, Post> implements PostService {

    @Resource
    private PostMapper postMapper;

    @Override
    public boolean addPost(Post post) {
        return postMapper.addPost(post)>0;
    }

    @Override
    public boolean deletePost(int id) {
        return postMapper.deletePost(id)>0;
    }

    @Override
    public boolean updatePost(Post post) {
        return postMapper.updatePost(post)>0;
    }


}
